package JAVATest;

import java.util.Scanner;

/**
 * ClassName:Text_017
 * Package:JAVATest
 * Description:
 *
 * @Author:ZhangXin
 * @Create2023/1/13-19:02
 * @Version:v1.0
 */
public class Text_017 {
    public static void main(String[] args) {
        //把整数上的每一位都添加到数组当中
        //动态初始化
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入您要加密的密码:");
        int number = sc.nextInt();
        int temp = number;
        int count = 0;
        while (number != 0) {
            number = number / 10;
            count++;
        }
        int[] arr = new int[count];
        int index=arr.length-1;
        while(temp!=0){
            int num1 = temp % 10;
            temp = temp / 10;
            arr[index]=num1;
            index --;
        }
    }
}
